﻿<html>

<head>
    <title>店员宝</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <link href="./main.css" rel="stylesheet">
    <link rel="icon" href="./assets/icon/clerk.ico" type="image/x-icon">
    <link rel="shortcut icon" href="./assets/icon/clerk.ico" type="image/x-icon">
    <script src="./assets/lib/cordova/cordova.js"></script>
    <script src="./assets/lib/tools/UNIC_GBK.js"></script>
    <script src="./boots/jquery.js"></script>
    <script src="./assets/js/update.js"></script>
    <script>
        /**
         * 全局事件注册器
        */
        var EventRegistHandle = (function(){
            var handleList = [];
            var obj = {};
            /**
             * 注册事件
            */
            obj.RegistHandle = function(eventName,handle){
                var has = false;
                for(var i=0;i<handleList.length;i++){
                    if(handleList[i].eventName == eventName) {
                        has = true;
                        break;
                    }
                }
                if(!has) handleList.push({eventName:eventName,handle:handle});
            }
            /**
             * 调用事件
            */
            obj.Call = function(eventName,args){
                for(var i=0;i<handleList.length;i++){
                    if(handleList[i].eventName == eventName){
                        handleList[i].handle(args);
                        break;
                    }
                }
            }
            /**
             * 移除事件
            */
            obj.RemoveHandle = function(eventName){
                for(var i=0;i<handleList.length;i++){
                    if(handleList[i].eventName == eventName){
                        handleList[i].handle = null;
                        handleList.splice(i, 1);
                        break;
                    }
                }
            }

            return obj;
        })();

        function jsonpCallBack(json){
            EventRegistHandle.Call("jsonpHandle",json);
        }
    </script>
</head>
<!-- 3. Display the application -->

<body>
    <ion-app class="layout layout-align-center-center fullscreen">
        <img src="./assets/images/loading.gif" style="width:7rem;">
    </ion-app>
</body>

</html>